#ifndef __PROTOCOL_PARSER_H
#define __PROTOCOL_PARSER_H

#include "../../include/nlohmann/json.hpp" 
#include <string>

using std::pair;
using std::string;
using json = nlohmann::json;


// 协议解析类
class ProtocolParser{
public:
    ProtocolParser(){};
    ~ProtocolParser(){};

    pair<int, string> doParse(string revJson){
       pair<int, string> result; 
       json parser = nlohmann::json::parse(revJson); 
       parser.at("type").get_to(result.first); 
       parser.at("content").get_to(result.second); 
       return result;
    }

private:

};
#endif // !__PROTOCOL_PARSER_H
